<!DOCTYPE html>
<html>
<head>
    <title>OnJ, OracleJavaCommunity</title>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
<!-- jquery로 파일 첨부 추가 -->
$(document).ready(function() {
    //add more file components if Add is clicked
    $('#addFile').click(function() {
        var fileIndex = $('#fileview tr').children().length;      
        $('#fileview').append(
                '<tr><td>'+
                '   <input type="file" name="files['+ fileIndex +']" />'+
                '</td></tr>');
    });     
});
</script>
</head>
<body>
<h3>Spring WEB MVC MuliFile Upload(oraclejava community)</h3>
 
<form method="post" action="save.html" enctype="multipart/form-data">
 
    Upload Directory : <input type="text" name="upDir" value="c:/java/project/upload/"/><br><br>
    <input id="addFile" type="button" value="File Add" />    
    <table id="fileview">
        <tr>
            <td><input name="files[0]" type="file" /></td>
        </tr>        
    </table>
    <br/><input type="submit" value="Upload" />
</form>
</body>
</html>